import request from '@/utils/request.js'

const apiHost = '/cmsservice/banner'

export default {

    getByPage(current, size, queryBanner) {

        return new request({
            url: `${apiHost}/getPage/${current}/${size}`,
            method: "post",
            data: queryBanner
        })

    },
    deleteById(id) {

        return new request({
            url: `${apiHost}/remove/${id}`,
            method: "delete",
        })

    },
    saveBanner(banner){
        return new request({
            url:`${apiHost}/save`,
            method:"post",
            data: banner
        })


    },
    getDetailById(id){
        return new request({
            url:`${apiHost}/getBannerById/${id}`,
            method:"get",
        })
    },
    updateBanner(banner){
        return new request({
            url:`${apiHost}/update`,
            method:"post",
            data:banner
        })
    },
    getAll(){
        return new request({
            url:`${apiHost}/getAll`,
            method:"get",
        })
    }


}

